package com.tjtt.tdm.knowledge.dao;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import com.tjtt.tdm.base.PageResult;
import com.tjtt.tdm.exception.DaoException;
import com.tjtt.tdm.exception.ServiceException;
import com.tjtt.tdm.knowledge.bean.KnowFileType;
import com.tjtt.tdm.knowledge.bean.KnowledgeHandOut;
import com.tjtt.tdm.knowledge.bean.KnowledgeManage;

public interface IKnowledgeManageDao{

	/**
	 * 根据过滤条件得到所有的结果集
	 * @param filterMap
	 * @return
	 * @throws DaoException
	 */
	public PageResult getAllAfterList(String fileType,Map filterMap) throws DaoException;
	/**
	 * 根据过滤条件得到所有的结果集
	 * @param filterMap
	 * @return
	 * @throws DaoException
	 */
	public PageResult getAllList(Map filterMap) throws DaoException;
	
	/**
	 * 根据过滤条件得到所有的结果集
	 * @param filterMap
	 * @return
	 * @throws DaoException
	 */
	public List<KnowledgeManage> getAllKMList(Map filterMap) throws DaoException;
	/**
	 * 保存对象
	 * @param o
	 * @throws DaoException
	 */
	public void saveOrUpdate(Object o)throws DaoException;
	
	/**
	 * 根据角色查询用户
	 * @param filterMap
	 * @return
	 */
	public PageResult queryUsersByRoleId(Map filterMap);
	/**
	 * 根据id删除文件
	 * @param id
	 */
	public void delKnowledgeManage(Long id);
	/**
	 * 
	 * @throws Exception void
	 * @author 张海娜
	 * @date 2012-10-11 下午04:04:40
	 */
	public KnowFileType getKnowledgeByName(String typeName);
	/**
	 * 功能描述：通过父节点id查询文件列表
	 * @param fileType
	 * @param filterMap
	 * @return
	 * @throws ServiceException PageResult
	 * @author 张海娜
	 * @date 2012-10-15 上午10:52:06
	 */
	public PageResult queryKnowledgeManageListByPatentId(String fileType,Map<String, String> filterMap) throws DaoException;
	/**
	 * 判断文件类别下是否有文件
	 * @throws IOException
	 * @throws ServiceException void
	 * @author 张海娜
	 * @date 2012-10-19 下午06:30:38
	 */
	public PageResult getCountKnowledgeTypeByFileType(Long id,Map<String, String> filterMap);
	/**
	 * 查询所有的标签
	 * @param filterMap
	 * @return PageResult
	 * @author 张海娜
	 * @date 2012-10-26 下午02:31:39
	 */
	public PageResult getAllKnowFileType(Map<String, String> filterMap);
	public PageResult getAllKnowledgeManageShouCangExec(
			Map<String, String> filterMap);
	public KnowledgeManage findFileAddressById(long id);
	public PageResult getAllKnowledgeManageAfterByUserIdExec(
			Map<String, String> filterMap);
	public PageResult getAllKnowledgeManageByPatentIdByUserIdExec(String fileType, 
			Map<String, String> filterMap);
	public String findFenFa(String uid, String id);
	public PageResult searchFenFaUserExec(Map<String, String> filterMap);
	public List<KnowledgeHandOut> findUserids(String knowledgeid);
	public List<KnowledgeHandOut> findKnowledgeHanderOut(long id);
	public void delknowledgeHandOut(long id);
	
}
